project (concurrent)

include_directories(${networking_SOURCE_DIR}/inc)
include_directories(${networking_SOURCE_DIR}/tools/)

# 输出到concurrent目录下面
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/concurrent)

add_executable(loop_udp_time_server loop_udp_time_server.c)
target_link_libraries(loop_udp_time_server tools)

add_executable(loop_tcp_datetime_server loop_tcp_datetime_server.c)
target_link_libraries(loop_tcp_datetime_server tools)

add_executable(fork_tcp_echo_server fork_tcp_echo_server.c)
target_link_libraries(fork_tcp_echo_server tools)

add_executable(thread_tcp_echo_server thread_tcp_echo_server.c)
target_link_libraries(thread_tcp_echo_server tools pthread)

add_executable(single_thread_tcp_echo_server single_thread_tcp_echo_server.c)
target_link_libraries(single_thread_tcp_echo_server tools)

# datetime server supporting both udp and tcp
add_executable(poll_tcp_udp_datetime_server poll_tcp_udp_datetime_server.c)
target_link_libraries(poll_tcp_udp_datetime_server tools)
